#ifndef TRAITEMENT_H
#define TRAITEMENT_H

#include <QtCore/QObject>

class QLocalServer;
class QLocalSocket;

#include <vector>
#include "IpcServer.h"

class Traitement
{
public:
	Traitement();

	void openFrame();

	void SetBrillanceProprety(int brightnessLevel);
	void SetContrasteProprety(double contrastLevel);
	void SetConvolutionProprety(int convolution[9]);
	void SetWidth(int width);
	void SetActiveConvo(int activeConvo);

	void apply();

private:
	void applyBrightness();
	void applyContrast();
	void applyConvolution();

private:
	int mConvolution[9];
	int mBrightnessLevel;
	double mContrastLevel;
	unsigned int mWidth;
	unsigned char *mFrameData;
	unsigned int mFrameDataSize;
	int mActiveConvo;
};

#endif // TRAITEMENT_H
